@import url("https://fonts.googleapis.com/css?family=Press+Start+2P&display=swap");
/* reset */
* {
  margin: 0;
  padding: 0;
  /* 全局继承border-box */
  box-sizing: inherit;
}
html {
  font-size: 0.6vw;
  /* border-box可以刚好占满viewport */
  box-sizing: border-box;
}

body {
  font-family: "Press Start 2P", sans-serif;
  color: #eee;
  background-color: #222;
}

header {
  position: relative;
  height: 35vh;
  border-bottom: 7px solid #eee;
}

main {
  height: 65vh;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

h1 {
  position: absolute;
  text-align: center;
  font-size: 4rem;
  transform: translate(-50%, -50%);
  width: 100%;
  left: 50%;
  top: 52%;
}
.btn {
  border: none;
  background-color: #eee;
  color: #222;
  font-size: 2rem;
  font-family: inherit;
  padding: 2rem 3rem;
  cursor: pointer;
}
.again {
  position: absolute;
  top: 2rem;
  left: 2rem;
  display: none;
}
.guessNumber {
  background: #eee;
  color: #333;
  font-size: 6rem;
  width: 15rem;
  padding: 3rem 0rem;
  text-align: center;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
}
.between {
  position: absolute;
  right: 0;
  font-size: 1.4rem;
  top: 2rem;
  right: 2rem;
}
.left {
  display: flex;
  width: 52rem;
  flex-direction: column;
  align-items: center;
}
.right {
  width: 52rem;
  font-size: 2rem;
}
.guess {
  background: none;
  border: 4px solid #eee;
  font-family: inherit;
  color: inherit;
  font-size: 5rem;
  padding: 2.5rem;
  width: 25rem;
  text-align: center;
  display: block;
  margin-bottom: 3rem;
}
.btn:hover {
  background-color: #ccc;
}
p:first-child {
  margin-bottom: 8rem;
  height: 3rem;
}
p:nth-child(2) {
  margin-bottom: 2rem;
}

@media screen and (max-width: 680px) {
  html {
    font-size: 1.2vw;
  }
  h1 {
    top: 20%;
    font-size: 5rem;
  }
  .again {
    top: 75%;
  }
  .between {
    font-size: 2rem;
    top: 50%;
    right: 50%;
    text-align: center;
    width: 100%;
    transform: translate(50%, 50%);
  }
  main {
    flex-direction: column;
  }
  .left {
    margin-top: 10%;
  }
  .right {
    width: 75%;
    text-align: center;
    font-size: 3rem;
  }
  .guess {
    width: 75%;
  }
}
